3.814 \(\int \frac{A+B x}{x^{3/2} \sqrt{a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=99 \[ -\frac{2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b} \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{2 A (a+b x)}{a \sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}} \]

[Out]

(-2*A*(a + b*x))/(a*Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - (2*(A*b - a*B)*(a + b*x)*ArcTan[(Sqrt[b]*Sqrt[x])
/Sqrt[a]])/(a^(3/2)*Sqrt[b]*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0572507, antiderivative size = 99, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129, Rules used = {770, 78, 63, 205} \[ -\frac{2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b} \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{2 A (a+b x)}{a \sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x^(3/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(-2*A*(a + b*x))/(a*Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - (2*(A*b - a*B)*(a + b*x)*ArcTan[(Sqrt[b]*Sqrt[x])
/Sqrt[a]])/(a^(3/2)*Sqrt[b]*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{A+B x}{x^{3/2} \sqrt{a^2+2 a b x+b^2 x^2}} \, dx &=\frac{\left (a b+b^2 x\right ) \int \frac{A+B x}{x^{3/2} \left (a b+b^2 x\right )} \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=-\frac{2 A (a+b x)}{a \sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{\left (2 \left (-\frac{A b^2}{2}+\frac{a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \int \frac{1}{\sqrt{x} \left (a b+b^2 x\right )} \, dx}{a b \sqrt{a^2+2 a b x+b^2 x^2}}\\ &=-\frac{2 A (a+b x)}{a \sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{\left (4 \left (-\frac{A b^2}{2}+\frac{a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a b+b^2 x^2} \, dx,x,\sqrt{x}\right )}{a b \sqrt{a^2+2 a b x+b^2 x^2}}\\ &=-\frac{2 A (a+b x)}{a \sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{2 (A b-a B) (a+b x) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b} \sqrt{a^2+2 a b x+b^2 x^2}}\\ \end{align*}

Mathematica [A]  time = 0.0315884, size = 79, normalized size = 0.8 \[ \frac{2 (a+b x) \left (-\sqrt{x} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )-\sqrt{a} A \sqrt{b}\right )}{a^{3/2} \sqrt{b} \sqrt{x} \sqrt{(a+b x)^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x^(3/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(2*(a + b*x)*(-(Sqrt[a]*A*Sqrt[b]) - (A*b - a*B)*Sqrt[x]*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]]))/(a^(3/2)*Sqrt[b]*
Sqrt[x]*Sqrt[(a + b*x)^2])

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 71, normalized size = 0.7 \begin{align*} -2\,{\frac{bx+a}{\sqrt{ \left ( bx+a \right ) ^{2}}a\sqrt{x}\sqrt{ab}} \left ( A\arctan \left ({\frac{\sqrt{x}b}{\sqrt{ab}}} \right ) \sqrt{x}b-B\arctan \left ({\frac{\sqrt{x}b}{\sqrt{ab}}} \right ) \sqrt{x}a+A\sqrt{ab} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^(3/2)/((b*x+a)^2)^(1/2),x)

[Out]

-2*(b*x+a)*(A*arctan(x^(1/2)*b/(a*b)^(1/2))*x^(1/2)*b-B*arctan(x^(1/2)*b/(a*b)^(1/2))*x^(1/2)*a+A*(a*b)^(1/2))
/((b*x+a)^2)^(1/2)/a/x^(1/2)/(a*b)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(3/2)/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.32549, size = 263, normalized size = 2.66 \begin{align*} \left [-\frac{2 \, A a b \sqrt{x} -{\left (B a - A b\right )} \sqrt{-a b} x \log \left (\frac{b x - a + 2 \, \sqrt{-a b} \sqrt{x}}{b x + a}\right )}{a^{2} b x}, -\frac{2 \,{\left (A a b \sqrt{x} +{\left (B a - A b\right )} \sqrt{a b} x \arctan \left (\frac{\sqrt{a b}}{b \sqrt{x}}\right )\right )}}{a^{2} b x}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(3/2)/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

[-(2*A*a*b*sqrt(x) - (B*a - A*b)*sqrt(-a*b)*x*log((b*x - a + 2*sqrt(-a*b)*sqrt(x))/(b*x + a)))/(a^2*b*x), -2*(
A*a*b*sqrt(x) + (B*a - A*b)*sqrt(a*b)*x*arctan(sqrt(a*b)/(b*sqrt(x))))/(a^2*b*x)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**(3/2)/((b*x+a)**2)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.16518, size = 77, normalized size = 0.78 \begin{align*} \frac{2 \,{\left (B a \mathrm{sgn}\left (b x + a\right ) - A b \mathrm{sgn}\left (b x + a\right )\right )} \arctan \left (\frac{b \sqrt{x}}{\sqrt{a b}}\right )}{\sqrt{a b} a} - \frac{2 \, A \mathrm{sgn}\left (b x + a\right )}{a \sqrt{x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(3/2)/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

2*(B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*a) - 2*A*sgn(b*x + a)/(a*sqrt(x
))